1. Field of the Invention
The present invention relates to a method of controlling the clock frequency of a processor and, more particularly, to a method of controlling power in an electronic apparatus having a processor.
2. Description of the Related Art
In a method of saving the power of an electronic apparatus such as a computer, the operating clock frequency (or operating speed) of a processor (e.g., a CPU) is decreased to suppress power consumption of the processor. According to this method, the use ratio of the processor, the battery capacity, and the heat generation state of the processor are monitored, and power saving control is executed on the basis of these pieces of information.
For example, when a flag representing a busy state or the like is set in a predetermined memory area every time the processor accesses an I/O device or memory, the operating system (OS) (or driver software accessory to the OS) acquires the degree of load on the processor on the basis of the flag set count, obtaining the use ratio of the processor. When the OS determines that, for example, the use ratio of the processor is low, the OS decreases the clock frequency of the processor in power saving control.
The OS tends to recognize a value higher than the substantial use ratio of the processor owing to stall processing. This phenomenon readily occurs particularly for a high I/O access count or a large number of cache errors.
That is, even for a substantially low use ratio of the processor, the OS determines that the use ratio is high, and hardly decreases the clock frequency of the processor. In this case, power consumption of the processor cannot be efficiently suppressed.
The substantial use ratio of the processor may be detected by arranging specific hardware. However, newly arranging specific hardware undesirably leads to a high cost and large mounting space.
Jpn. Pat. Appln. KOKAI Publication No. 11-353052 discloses the following processor operating speed control method. The ratio between the performance index and power consumption index of a computer is used as an energy index. The CPU operating speed (operating frequency) is increased/decreased on the basis of the energy index, and power management processing which balances power saving and performance is executed. However, the technique of this reference is not designed to save power by paying attention to the substantial use ratio of a processor.